<template>
  <div>
    <el-pagination
    small
    background
    layout="total, prev, pager, next"
    :page-size="size"
    :total="total"
    class="mt-4"
    @current-change="currentChange"
  />
  </div>
</template>

<script setup lang="ts">
type Props = {
  total: number,
  size: number
}
defineProps<Props>()
const emit = defineEmits<{
  (e: 'current-change', index: number): void
}>()
const currentChange = (index: number) => {
  emit('current-change', index)
}
</script>

<style scoped>
.el-pagination{
  margin-top: 10px;
}
</style>